import org.codehaus.jackson.map.ObjectMapper;
import system.impl.MovieSystemImpl;
import teacher.Config;
import tool.FileUtil;

import java.io.IOException;

public class Test4 {
    public static void main(String[] args) {

        ObjectMapper objectMapper = new ObjectMapper();

        MovieSystemImpl movieSystem = new MovieSystemImpl();
        String json;
        try {
            String s = objectMapper.writeValueAsString(movieSystem);
            System.out.println(s);
            //解析
            MovieSystemImpl movieSystem1 = objectMapper.readValue(s,MovieSystemImpl.class);
            System.out.println(movieSystem1);
        }catch (IOException e){
            e.printStackTrace();
        }


    }
}
